from apps import jsonrpc_v1
from apps import jsonrpc_v2

@jsonrpc_v1.method('Common.index(id=Number, sex=bool,name=str,lve=Array,son =Object)')
def index(id, sex, name, lve, son):
    print(sex, name, lve, son )
    return u"Welcone to rpc %s" %id


@jsonrpc_v2.method('Common.add(id=Number, sex=bool,name=str,lve=Array,son =Object)')
def add(id, sex, name, lve, son):
    print(sex, name, lve, son )

    return u"id=%s,sex=%s,name=%s,lve=%s,son=%s" % (id,sex,name,lve,son)
